package homework;

public class ThreadDemo2 {
    public static void main(String[] args) {
//        Runnable r = new MyThread1();
//        Thread t = new Thread(r);
        //Thread t = new Thread(()-> System.out.println("起飞，哎，飞飞飞~"));
        Thread t = new Thread(){
            public void run(){
                System.out.println("起飞，哎，飞飞飞~");
            }
        };
        t.start();
        Thread t2 = new Thread(()-> System.out.println("起飞，哎，飞飞飞~"));
        t2.start();
    }

}
class MyThread1 implements Runnable{
    public void run(){
        System.out.println("起飞，哎，飞飞飞~");
    }
}
class MyThread2 implements Runnable{
    public  void run(){

    }
}